<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<html lang="en">
<!----查询时所加载的页面----->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>症状管理</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="icon" type="image/png" href="/resources/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/resources/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI" />
    <script src="/resources/js/echarts.min.js"></script>
    <link rel="stylesheet" href="/resources/css/amazeui.min.css" />
    <link rel="stylesheet" href="/resources/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/resources/css/app.css">
    <script src="/resources/js/jquery.min.js"></script>

</head>

<body data-type="widgets">
    <script src="/resources/js/theme.js"></script>
    <div class="am-g tpl-g">
        <%--头部开始--%>
        <%@include file="header.jsp" %>
        <%--头部结束--%>


        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">文章列表</div>
                            </div>

                                <div class="widget-body  am-fr">

                                <!-- 编辑栏 -->
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button type="button" class="am-btn am-btn-default am-btn-success" data-am-modal="{target: '#addmodel', closeViaDimmer: 0}"><span class="am-icon-plus"></span> 新增</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!-- 下拉框 -->
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                                    <div class="am-form-group tpl-table-list-select">
                                        <%--<select data-am-selected="{btnSize: 'sm'}">--%>
                                          <%--<option value="option1">所有类别</option>--%>
                                          <%--<option value="option2">IT业界</option>--%>
                                          <%--<option value="option3">数码产品</option>--%>
                                          <%--<option value="option3">笔记本电脑</option>--%>
                                          <%--<option value="option3">平板电脑</option>--%>
                                          <%--<option value="option3">只能手机</option>--%>
                                          <%--<option value="option3">超极本</option>--%>
                                        <%--</select>--%>
                                    </div>
                                </div>
                                <!-- 搜索框 -->
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                        <input type="text" id="searchContent" class="am-form-field ">
                                        <span class="am-input-group-btn">
                                            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" id="searchBtn" type="button"></button>
                                          </span>
                                    </div>
                                </div>
                                <!-- 表格显示 -->
                                <div class="am-u-sm-12 tableDiv">
                                    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black " id="example-r">
                                        <thead>
                                            <tr>
                                                <th>名称</th>
                                                <th>说明</th>
                                                <th>组件类型</th>
                                                <th>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                        <c:forEach items="${pageInfo.list}" var="a">
                                            <tr>
                                                <td>${a.sysmpName}</td>
                                                <td>${a.sysmpInstruct}</td>
                                                <td>${a.reserve1}</td>
                                                <td>
                                                    <div class="tpl-table-black-operation">
                                                        <a href="javascript:"  class="edit" data-am-modal="{target: '#addmode2', closeViaDimmer: 0}" onclick="update(${a.sysmpTypeId})">
                                                            <i class="am-icon-pencil" >编辑</i>
                                                        </a>
                                                        <a href="javascript:" class="tpl-table-black-operation-del" onclick="start_id(${a.sysmpTypeId},${a.state})">
                                                            <c:choose>
                                                                <c:when test="${a.state == 1}">禁用</c:when>
                                                                <c:when test="${a.state == 0}">启用</c:when>
                                                            </c:choose>
                                                        </a>
                                                        <!------判断------->
                                                        <a href="javascript:" class="tpl-table-black-operation-del" onclick="remov(${a.sysmpTypeId})">
                                                            <i class="am-icon-trash" ></i> 删除
                                                        </a>
                                                    </div>
                                                </td>
                                            </tr>
                                        </c:forEach>
                                        </tbody>
                                    </table>
                                </div>
                                    <!-- 分页开始///查询 -->
                                    <div class="am-u-lg-12 am-cf content_pageinfor2">
                                        <!-- 分页文字信息，其中分页信息都封装在pageInfo中 -->
                                        <div class="col-md-6">
                                            <ul class="content_pageinfor_ul2">当前第：${pageInfo.pageNum }页，总共：${pageInfo.pages }页，总共：${pageInfo.total }条记录</ul>
                                        </div>
                                        <div class="am-fr">
                                            <ul class="am-pagination tpl-pagination content_pageinfor_ul2">
                                                <!-- 首页 -->
                                                <li><a href="/SysmpType/searchSysmptomType?posion=1&content=${content}">首页</a></li>
                                                <!-- 上一页 -->
                                                <c:if test="${pageInfo.hasPreviousPage }">
                                                    <li>
                                                        <a href="/SysmpType/searchSysmptomType?posion=${pageInfo.pageNum-1 }&content=${content}" aria-label="Previous">
                                                            <span aria-hidden="true">&laquo;</span>
                                                        </a>
                                                    </li>
                                                </c:if>
                                                <!-- 循环遍历连续显示的页面，若是当前页就高亮显示，并且没有链接 -->
                                                <c:forEach items="${pageInfo.navigatepageNums }" var="page_Num">
                                                    <c:if test="${page_Num == pageInfo.pageNum }">
                                                        <li class="am-active"><a href="/SysmpType/searchSysmptomType?posion=${page_Num }&content=${content}">${page_Num }</a></li>
                                                    </c:if>
                                                    <c:if test="${page_Num != pageInfo.pageNum }">
                                                        <li><a href="/SysmpType/searchSysmptomType?posion=${page_Num }&content=${content}">${page_Num }</a></li>
                                                    </c:if>
                                                </c:forEach>
                                                <!-- 下一页 -->
                                                <c:if test="${pageInfo.hasNextPage }">
                                                    <li>
                                                        <a href="/SysmpType/searchSysmptomType?posion=${pageInfo.pageNum+1 }&content=${content}" aria-label="Next">
                                                            <span aria-hidden="true">&raquo;</span>
                                                        </a>
                                                    </li>
                                                </c:if>
                                                <!-- 末页 -->
                                                <li><a href="/SysmpType/searchSysmptomType?posion=${pageInfo.pages }&content=${content}">末页</a></li>
                                            </ul>
                                        </div>
                                    </div>
                                    <!-----------分页面结束-------->
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

       <!-- 添加分店模态框开始 -->
        <div class="am-modal am-modal-no-btn" tabindex="-1" id="addmodel">
            <div class="am-modal-dialog">
                <div class="am-modal-bd">
                    <div class="row">
                        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                            <div class="widget am-cf">
                                <div class="widget-head am-cf">
                                    <div class="widget-title am-fl">添加症状</div>
                                    <div class="widget-function am-fr">
                                        <a href="javascript: void(0)" class="am-close am-close-spin close_a" data-am-modal-close>&times;</a>
                                    </div>
                                </div>
                                <div class="widget-body am-fr">
                                    <form class="am-form tpl-form-border-form tpl-form-border-br">

                                        <!-- 症状名称-->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">名称</label>
                                            <div class="am-u-sm-7">
                                                <input type="text" id="name" onblur="checkName()" maxlength="255" class="am-form-field tpl-form-no-bg" placeholder="请输入详细信息，仅限中文！"  required="required" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"/>
                                            </div>
                                            <div class="am-u-sm-2">
                                                <a id="add_name" style="visibility: inherit"></a>
                                                <small>必填！</small>
                                            </div>
                                        </div>

                                        <!-- 症状说明-->
                                        <div class="am-form-group">
                                            <label class="am-u-sm-3 am-form-label">说明</label>
                                            <div class="am-u-sm-7">
                                            <textarea id="instruction" rows="5" maxlength="255" placeholder="请输入详细信息" ></textarea>
                                            </div>
                                            <div class="am-u-sm-2">
                                                <a id="add_instruction" style="visibility: inherit"></a>
                                            </div>
                                        </div>

                                         <!-- 组件类型-->
                                        <div class="am-form-group">
							                <label class="am-u-sm-3 am-form-label">组件类型</label>
							                <div class="am-u-sm-7 " id="types">
							                    <div class="am-form-group">
							                        <label class="am-radio-inline">
							                            <input type="radio" name="ispre" checked="checked" value="1"> 文本框
							                        </label>
							                        <label class="am-radio-inline">
							                            <input type="radio" name="ispre" value="2"> 单选框
							                        </label>
							                        <label class="am-radio-inline">
							                            <input type="radio" name="ispre" value="3"> 上传文件
							                        </label>
							                    </div>
							                </div>
							                <div class="am-u-sm-2">
                                                <a id="add_massgae" style="visibility: inherit"></a>
                                                <small>必填！</small>
                                            </div>
							            </div>

                                        <!-- 按钮 -->
                                        <div class="am-form-group">
                                            <span class="am-u-sm-3">
                                            </span>
                                            <div class="am-u-sm-6 am-u-sm-push-3">
                                                <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success am-u-sm-5" data-am-modal-close="">取消</button>
                                                <span class="am-u-sm-2">
                                                </span>
                                                <button type="submit" href="javascript: void(0)" id="form_submit" class="am-btn am-btn-primary tpl-btn-bg-color-success am-u-sm-5" data-am-modal-close>提交</button>
                                            </div>
                                            <span class="am-u-sm-3">
                                            </span>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 整个表单结束 -->
                </div>
            </div>
        </div>
        <!-- 添加分店模态框结束 -->
    <!-- 更新模态框开始 -->
    <div class="am-modal am-modal-no-btn" tabindex="-1" id="addmode2">
        <div class="am-modal-dialog">
            <div class="am-modal-bd">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">更新症状</div>
                                <div class="widget-function am-fr">
                                    <a href="javascript: void(0)" class="am-close am-close-spin close_a" data-am-modal-close>&times;</a>
                                </div>
                            </div>
                            <div class="widget-body am-fr">
                                <form class="am-form tpl-form-border-form tpl-form-border-br">

                                    <!-- 症状名称-->
                                    <div class="am-form-group">
                                        <label class="am-u-sm-3 am-form-label">名称</label>
                                        <div class="am-u-sm-7">
                                            <input type="text" id="name2" class="am-form-field tpl-form-no-bg" onblur="updata_checkName()" placeholder="请输入详细信息，仅限中文！" maxlength="255"  required="required" onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"/>
                                        </div>
                                        <div class="am-u-sm-2">
                                            <a id="updat_name" style="visibility: inherit"></a>
                                            <small>必填！</small>
                                        </div>
                                    </div>

                                    <!-- 症状说明-->
                                    <div class="am-form-group">
                                        <label class="am-u-sm-3 am-form-label">说明</label>
                                        <div class="am-u-sm-7">
                                            <textarea id="instruction2" rows="5" placeholder="请输入详细信息" maxlength="255" ></textarea>
                                        </div>
                                        <div class="am-u-sm-2">
                                            <a id="updat_instruction" style="visibility: inherit"></a>
                                        </div>
                                    </div>

                                    <!-- 组件类型-->
                                    <div class="am-form-group">
                                        <label class="am-u-sm-3 am-form-label">组件类型</label>
                                        <div class="am-u-sm-7 " id="types2">
                                            <div class="am-form-group">
                                                <label class="am-radio-inline">
                                                    <input type="radio" id="text" name="ispre"  value="1"> 文本框
                                                </label>
                                                <label class="am-radio-inline">
                                                    <input type="radio" id="text_on" name="ispre" value="2"> 单选框
                                                </label>
                                                <label class="am-radio-inline">
                                                    <input type="radio" id="text_shang" name="ispre" value="3"> 上传文件
                                                </label>
                                            </div>
                                        </div>
                                        <div class="am-u-sm-2">
                                            <a id="updat_massgae" style="visibility: inherit"></a>
                                            <small>必填！</small>
                                        </div>
                                    </div>

                                    <!-- 按钮 -->
                                    <div class="am-form-group">
                                            <span class="am-u-sm-3">
                                            </span>
                                        <div class="am-u-sm-6 am-u-sm-push-3">
                                            <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success am-u-sm-5" data-am-modal-close="">取消</button>
                                            <span class="am-u-sm-2">
                                                </span>
                                            <button type="submit" href="javascript: void(0)" id="form_submit2" class="am-btn am-btn-primary tpl-btn-bg-color-success am-u-sm-5" data-am-modal-close>提交</button>
                                        </div>
                                        <span class="am-u-sm-3">
                                            </span>
                                    </div>

                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 整个表单结束 -->
            </div>
        </div>
    </div>
    <!-- 更新模态框结束 -->
    <script src="/resources/js/amazeui.min.js"></script>
    <script src="/resources/js/amazeui.datatables.min.js"></script>
    <script src="/resources/js/dataTables.responsive.min.js"></script>
    <script src="/resources/js/jquery.min.js"></script>
    <script src="/resources/js/cookie.js"></script>
    <script src="/resources/js/app.js"></script>
   <script src="/resources/js/template_addsysmp.form.js"></script>
    <script>
        $(document).ready(function(){
            var content = $.cookie("content2");
            $("#searchContent").val(content);
        });
    </script>
</body>
</html>